#{extends 'orgLead.html' /}

<title>${dep.name}</title>
#{if isBlocked}
Sorry You Have Been Blocked From This Department...
#{/if}
#{else}
#{if isOrganizer}

#{if dep.isLocked==true}
<h1>State: Locked</h1>
<a href="@{Application.unlockDepartment(dep.id)}"> Unlock Department </a>
#{/if}
#{if dep.isLocked==false}
<h1>State: Unlocked</h1>
<a href="@{Application.lockDepartment(dep.id)}"> Lock Department </a>
#{/if}
#{/if}
#{if z==3}
<h1>All topics are active</h1>
#{/if}
#{if z==1}
<h1>there are topics inactive in this department</h1>
#{/if}
<a href="@{Application.Topic(dep.id)}"> CreateTopic</a>
<br />
<br>
#{if isOrganizer}
<br>
<a href ="@{Application.requestForm(dep.id)}">Invite new follower</a>
#{/if}
<br>
<br>
#{ifnot isFollowing}
<a href="@{Application.followDep(dep.id)}"onclick="alert('You are now following the Department successfully');">Follow</a>#{/ifnot}
<br/>
<a href="@{Application.viewAllTopics(dep.id)}">Topics</a>
<br />
#{if isOrgLead}
<a href="@{Application.setRelationBetweenDepartments(dep.id)}">Set
	Relation</a>
<br>

<a href="@{Application.inviteOrganizer(dep.id)}">Invite an Organizer</a>
<br>
<a href = "@{Application.manageRelations(dep.id)}">Manage Relations</a>
<br>
<a href="@{Application.executionCenter(dep.id)}">Execution Centre</a>

#{/if}


<br>
<a href ="@{Application.requestTopic(dep.id)}">Request a topic</a>
<br>
#{if isOrgLead}
<a href ="@{Application.blockUserFromDepartment(dep.id)}">Users Restrictions</a>
#{/if}
<br>

<br>
<a href = "@{Application.showOrg(org.id)}">Back to ${org.name}</a>
#{/else}
